﻿using System.Collections.Generic;
using System.ServiceModel;
using Pku.BookStore.Model;

namespace Pku.BookStore.IServices
{
    [ServiceContract(Name = "IFavoritesServices", Namespace = "Pku.BookStore.IServices")]
    public interface IFavoritesServices
    {
        /// <summary>
        /// 增加收藏夹
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Add")]
        int Add(FavoritesModel entity);

        /// <summary>
        /// 修改收藏夹信息
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Modify")]
        bool Modify(FavoritesModel entity);

        /// <summary>
        /// 搜索
        /// </summary>
        /// <returns></returns>
        [OperationContract(Name = "Search")]
        List<FavoritesModel> Search(FavoritesParam param);

        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="favoritesID"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetEntityById")]
        FavoritesModel GetEntityById(int favoritesID);

        /// <summary>
        /// 是否存在
        /// </summary>
        /// <param name="Str">关键字</param>
        /// <returns></returns>
        [OperationContract(Name = "Exist")]
        bool Exist(int BookID, int UserID);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="CategoryID"></param>
        /// <returns></returns>
        [OperationContract(Name = "Delete")]
        bool Delete(int FavoritesID);

    }
}
